/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MongoDAL;

import DALFactory.IDALStatement;
import com.mongodb.DB;
import com.mongodb.DBCollection;

/**
 *
 * @author kocio
 */
public class MongoStatement implements IDALStatement {
private MongodbConn conn;
/**
 * 
 * @param TableName
 * @return 
 */
    public DBCollection  QueryTable(String TableName)
    {

         conn=new MongodbConn();
        DB db=conn.getDB();
        DBCollection colls=db.getCollection(TableName);
        return colls;
    }
    /**
     * 
     */
public void CloseDB()
    {
	conn.CloseDB();}
protected void finalize() 
{
	conn.CloseDB();
	}
}
